import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  // base: '/airplane/',
  base: '/wangguan/',
  routes: [
    {
      path: '/',
      redirect: '/login',
      meta: {allowBack: false}
    },
    {
      path: '/home',
      component: resolve => require(['../components/common/Home.vue'], resolve),
      meta: {allowBack: false},
      children: [
        {
          path: '/hardGateway', // 网关管理
          component: resolve => require(['../components/hardware/HardGateway.vue'], resolve)
        }
      ]
    },
    {
      path: '/login',
      component: resolve => require(['../components/login/Login.vue'], resolve)
    }
  ]
})
